package ch.sfug.lang {

	/**
	 * @author loop
	 */
	public class Language {

		public static var ACTIVE:String;
		private static var lt:LanguageTranslation;

		/**
		 * sets the translation
		 */
		public static function set translation( trans:LanguageTranslation ):void {
			lt = trans;
		}

		
		public static function get( key:String, ...args ):String {
			var t:String = lt.get(key);
			while( args.length > 0 ) {
				t = t.replace(/%s/, args.shift());
			}
			return t;
		}
	}
}
